'''
Created on Dec 8, 2015

@author: JimmyMo
'''
import unittest

from output import Output
import ruleprocessor
from fakecollector import FakeCollector

class TestOutput(unittest.TestCase):
    def testDefaultOutput(self):
        collector = FakeCollector()
        ruleProcessor = ruleprocessor.getRuleProcessor("RegexRuleProcessor", "(.*)\.mkv")
#         ruleprocessor = RuleProcessor("(.*)\.mkv")
        output = Output(enabled=True, name='testoutput', collector=collector, ruleprocessor=ruleProcessor)
        content = output.do_output();
        self.assertEqual("fake source - 哆啦A梦：伴我同行.Stand.By.Me.Doraemon.2014.BluRay.720p.x264.3Audio.AC3-CnSCG", content)
        
if __name__ == "__main__":
    #import sys;sys.argv = ['', 'Test.testName']
    unittest.main()